#-*-Makefile-*- vim:syntax=make
#$Id: appdoc.extra,v 1.2 2008-05-02 20:49:44 idgay Exp $

# configure the base for the app dirs.  This is used to generate more
# useful package names in the documentation.
ifeq ($(BASEDIR)_x, _x)
BASEDIR := $(shell pwd | sed 's@\(.*\)/apps.*$$@\1@' )
endif

BUILD_DEPS = appdoc_

ifeq ($(filter quiet,$(APPDOC)),quiet)
QUIET = -quiet
endif

appdoc_: FORCE
	@echo "    Making application documentation for $(COMPONENT) on $(PLATFORM)"
        # first generate the xml files
	nesdoc -o build $(NESDOC_FLAGS) $(PFLAGS) $(CFLAGS) $(COMPONENT).nc -app $(QUIET)
        # generate html from the xml files
	nesdoc -o build -html -target=$(PLATFORM) $(QUIET)
